# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pysqlite
_pkgname=pysqlite
pkgver=2.8.3
pkgrel=4
pkgdesc='DB-API 2.0 interface for SQLite 3.x.'
url='https://pypi.org/project/pysqlite/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2' 'sqlite')
makedepends=('python2-setuptools')
conflicts=('python-pysqlite<=2.8.1-1' 'python2-pysqlite-legacy')
replaces=('python-pysqlite<=2.8.1-1')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9bf378b47fe020b378a9bd749b2b27cefcf8018fbe715cca54004b36092d2202ed0bb7d8fb8bc9820ce16918e01cea8bd1f032c640d1c461bd99cdf2632b8e3e')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/pysqlite2-doc"
}

